<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>English attendance管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#btnImport").click(function(){
				$.jBox($("#importBox").html(), {title:"导入数据", buttons:{"关闭":true}, 
					bottomText:"导入文件不能超过5M，仅允许导入“xls”或“xlsx”格式文件！"});
			});
			
			$("#btnExport").click(function(){
				top.$.jBox.confirm("确认要导出考勤数据吗？","系统提示",function(v,h,f){
					if(v=="ok"){
						var warehouse = $("#warehouse").val();
						$("#searchForm").attr("action","${ctx}/uk/attendanceUk/export?warehouse="+warehouse);
						$("#searchForm").submit();
					}
				},{buttonsFocus:1});
				top.$('.jbox-body .jbox-icon').css('top','55px');
			});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			var warehouse = $("#warehouse").val();
			$("#searchForm").attr("action","${ctx}/uk/attendanceUk/list?warehouse="+warehouse);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
 <div id="importBox" class="hide">
		<form id="importForm"  action="${ctx}/uk/attendanceUk/import" method="post" enctype="multipart/form-data"
			class="form-search" style="padding-left:20px;text-align:center;" onsubmit="loading('正在导入，请稍等...');"><br/>
			<input id="uploadFile" name="file" type="file" style="width:330px"/><br/><br/>
			<input id="warehouse" name="warehouse" type="hidden" value="${warehouse}"/>
			<input id="btnImportSubmit" class="btn btn-primary" type="submit" value="   导    入   "/>
			<!--   <a href="${ctx}/cn/attendanceCn/import/template">下载模板</a>-->
			
		</form>
	</div>
	
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/uk/attendanceUk/">English attendance</a></li>
		<!--  
		<shiro:hasPermission name="uk:attendanceUk:edit"><li><a href="${ctx}/uk/attendanceUk/form">English attendance添加</a></li>
		</shiro:hasPermission>
		-->
	</ul>
	<form:form id="searchForm" modelAttribute="attendanceUk" action="${ctx}/uk/attendanceUk/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li>
				<label>Date：&nbsp;</label><input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
					value="<fmt:formatDate value="${attendanceUk.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
				&nbsp;--&nbsp;<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
					value="<fmt:formatDate value="${attendanceUk.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>&nbsp;&nbsp;
			</li>
			<li><label>employeeNo：</label>
				<form:input path="employeeNo" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>name：</label>
				<form:input path="name" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li class="btns">
			<input id="btnSubmit" class="btn btn-primary" type="button" value="查询" onclick="return page();"/>
			<input id="btnImport" class="btn btn-primary" type="button" value="导入"/>
			<input id="btnExport" class="btn btn-primary" type="button" value="导出"/>
			</li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>warehouse</th>
				<th>date</th>
				<th>employeeNo</th>
				<th>name</th>
				<th>cardNo</th>
				<th>equipment</th>
				<th>equipmentNo</th>
				<th>inputPoint</th>
				<th>outputPoint</th>
				<th>verificationMode</th>
				<th>accessState</th>
				<th>eventDescription</th>
				<th>linkageTriggerCondition</th>
				<th>createBy</th>
				<th>createDate</th>
				<th>updateBy</th>
				<th>updateDate</th>
				<th>remarks</th>
				<!--  
				<shiro:hasPermission name="uk:attendanceUk:edit"><th>操作</th></shiro:hasPermission>
				-->
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="attendanceUk">
			<tr>
				<td>
					${attendanceUk.warehouse}
				</td>
				<td>
					<fmt:formatDate value="${attendanceUk.date}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${attendanceUk.employeeNo}
				</td>
				<td>
					${attendanceUk.name}
				</td>
				<td>
					${attendanceUk.cardNo}
				</td>
				<td>
					${attendanceUk.equipment}
				</td>
				<td>
					${attendanceUk.equipmentNo}
				</td>
				<td>
					${attendanceUk.inputPoint}
				</td>
				<td>
					${attendanceUk.outputPoint}
				</td>
				<td>
					${attendanceUk.verificationMode}
				</td>
				<td>
					${attendanceUk.accessState}
				</td>
				<td>
					${attendanceUk.eventDescription}
				</td>
				<td>
					${attendanceUk.linkageTriggerCondition}
				</td>
				<td>
					${attendanceUk.createBy.id}
				</td>
				<td>
					<fmt:formatDate value="${attendanceUk.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${attendanceUk.updateBy.id}
				</td>
				<td>
					<fmt:formatDate value="${attendanceUk.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${attendanceUk.remarks}
				</td>
				<!-- 
				<shiro:hasPermission name="uk:attendanceUk:edit"><td>
    				<a href="${ctx}/uk/attendanceUk/form?id=${attendanceUk.id}">修改</a>
					<a href="${ctx}/uk/attendanceUk/delete?id=${attendanceUk.id}" onclick="return confirmx('确认要删除该English attendance吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
				 -->
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>